package com.fjec.im.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjec.common.protocol.JsonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.fjec.im.service.IBizSystemMessageService;

import javax.annotation.Resource;

/**
 * <p>
 * 004.系统消息表 前端控制器
 * </p>
 *
 * @author admin
 * @since 2020-10-20
 */
@RestController
@RequestMapping("/")
public class BizSystemMessageController {

    @Resource
    private IBizSystemMessageService service;

    /**
     * 获取系统消息列表
     *
     * @param page
     * @return
     */
    @GetMapping("/y/im/sys/msg/list")
    public JsonResult getSystemMessageList(Page page) throws Exception {
        return service.getSystemMessageList(page);
    }

    /**
     * 获取消息信息
     *
     * @param msgId
     * @return
     */
    @PostMapping("/y/im/sys/msg")
    public JsonResult readSystemMessage(Long msgId) throws Exception {
        return service.readSystemMessage(msgId);
    }

}
